1 namespace Snake
2 {
3     
public enum Direction
4     {
5         Up,
6         Down,
7         Left,
8         Right
9     };
10
11     
//Download source code tại Codefly.vn
12     
public class Settings
13     {
14         
public static int Width { get; set; }
15         
public static int Height { get; set; }
16         
public static int Speed { get; set; }
17         
public static int Score { get; set; }
18         
public static int Points { get; set; }
19         
public static bool GameOver { get; set; }
20         
public static Direction direction { get; set; }
21
22         
public Settings()
23         {
24             Width =
16;
25             Height =
16;
26             Speed =
16;
27             Score =
0;
28             Points =
100;
29             GameOver =
false;
30             direction = Direction.Down;
31         }
32     }
33
34
35 }



Game rắn săn mồi bằng c# _ snake full code 16.769 lượt xem

Gõ tìm kiếm nhanh...